package com.dy.lock.screen.dao.impl;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.CustomerAuthenticationDao;
import com.dy.lock.screen.pojo.CustomerAuthenticationInfo;

@Repository("customerAuthenticationDao")
public class CustomerAuthenticationDaoImpl extends
		BaseDaoImpl<CustomerAuthenticationInfo, String> implements
		CustomerAuthenticationDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.AuthenticationMapper";
	}

	@Override
	public CustomerAuthenticationInfo queryByPrimaryKey(String id) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".selectByPrimaryKey", id);
	}

	@Override
	public CustomerAuthenticationInfo queryAuthStatus(
			CustomerAuthenticationInfo authenticationInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryAuthStatus", authenticationInfo);
	}

	@Override
	public CustomerAuthenticationInfo queryAuthPassedStatus(
			CustomerAuthenticationInfo authenticationInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryAuthPassedStatus",
				authenticationInfo);
	}

}
